package com.jiazixuan.stock.pojo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 周k封装
 */
@ApiModel(description = "周k")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Stock4EvrWeekDomain {
    /**
     * 一周内平均价
     */
    @ApiModelProperty(value = "一周内平均价", position = 1)
    private BigDecimal avgPrice;
    /**
     * 一周内最低价
     */
    @ApiModelProperty(value = "一周内最低价", position = 2)
    private BigDecimal minPrice;
    /**
     * 周一开盘价
     */
    @ApiModelProperty(value = "周一开盘价", position = 3)
    private BigDecimal openPrice;
    /**
     * 一周内最高价
     */
    @ApiModelProperty(value = "一周内最高价", position = 4)
    private BigDecimal maxPrice;
    /**
     * 周五收盘价
     */
    @ApiModelProperty(value = "周五收盘价", position = 5)
    private BigDecimal closePrice;
    /**
     * 周内最小交易时间（用于后端计算，前端不展示）
     */
    @ApiModelProperty(value = "周内最小交易时间", hidden = true)
    @JsonIgnore
    private Date miTime;
    /**
     * 一周内最大时间
     */
    @ApiModelProperty(value = "一周内最大时间", position = 6)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "Asia/Shanghai")
    private Date mxTime;
    /**
     * 股票编码
     */
    @ApiModelProperty(value = "股票编码", position = 7)
    private String stockCode;
}
